package com.haixiaoke.saas.repository.service;


import com.haixiaoke.saas.repository.dto.HousingAllocationDTO;
import com.haixiaoke.saas.repository.pojo.HousingAllocation;
import com.haixiaoke.saas.repository.vo.HousingAllocationVO;

import java.util.Date;
import java.util.List;

/**
 * 房屋配置Service接口
 *
 * @author qixi
 * @date 2023-04-10
 */
public interface IHousingAllocationService {


    HousingAllocation selectHousingAllocationById(Long allocationId);
    /**
     * 查询房屋配置
     *
     * @param allocationId 房屋配置主键
     * @return 房屋配置
     */
    public HousingAllocation selectHousingAllocationByAllocationId(Long allocationId);

    /**
     * 查询房屋配置列表
     *
     * @param housingAllocation 房屋配置
     * @return 房屋配置集合
     */
    List<HousingAllocation> selectHousingAllocationList(HousingAllocation housingAllocation);

    /**
     * 新增房屋配置
     *
     * @param housingAllocation 房屋配置
     * @return 结果
     */
    int insertHousingAllocation(HousingAllocation housingAllocation);

    /**
     * 修改房屋配置
     *
     * @param housingAllocation 房屋配置
     * @return 结果
     */
    int updateHousingAllocation(HousingAllocation housingAllocation);

    /**
     * 批量删除房屋配置
     *
     * @param allocationIds 需要删除的房屋配置主键集合
     * @return 结果
     */
    int deleteHousingAllocationByAllocationIds(Long[] allocationIds);

    /**
     * 删除房屋配置信息
     *
     * @param allocationId 房屋配置主键
     * @return 结果
     */
    int deleteHousingAllocationByAllocationId(Long allocationId);

    /**
     * 修改房屋上下架状态
     * @param housingAllocation
     * @return
     */
    int updateHousingAllocationState(HousingAllocation housingAllocation);

    HousingAllocation selectHousingAllocationByHouseId(String houseId);

    boolean checkHouseIdUnique(String houseId);

    List<HousingAllocationVO> selectHousingAllocationChooseHouse(HousingAllocationDTO dto);

    /**
     * 批量查询订单
     * @param allocationId
     * @return
     */
    List<HousingAllocation> selectByAllocationIds(List<Long> allocationId);


    int updateHousingAllocationApartmentState(HousingAllocation housingAllocation);

    int insertHousingAllocationList(HousingAllocation housingAllocation);

    int updateAllocation(HousingAllocation allocation);
    int updateApartmentAllocation(HousingAllocation allocation);

    int updateHousingAllocationCleaningType(HousingAllocation housingAllocation);

    boolean checkLongApartmentTime(Date rentableStartTime,Date rentableEndTime);

    List<HousingAllocationVO> conditionList(HousingAllocationDTO dto);
}
